import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 查询技师
export const getList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/workshopManagement/technicianFindByCompany`, { params });

// 查询技师
export const PersonList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/workshopManagement/technicianScheduling`, { params });

// 检查项确认
export const saveList = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/repair/workshopManagement/saveTechnicianScheduling`, params);

// 上传文件
export const uploadExcel = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/repair/workshopManagement/importAttendancesExcel`, params);
// 导入模板下载
// export const exportClaimModel = () => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/workshopManagement/exportAttendancesModel`);
export const exportClaimModel = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/workshopManagement/exportAttendancesModel`, { params, responseType: 'blob' });
// 维护技师考勤表查询
export const getListP = params => axios.get(`${SERVER.SEARCH_DMSCLOUD_REPAIR}/repair/workshopManagement/queryAttendances`, { params });

// 技师排班表 - 全部排班
export const getAllList = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/workshopManagement/technicianAll`, { params });

// 技师排班表 - 按排班日期查询排班工人
export const technicianFindByDate = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/repair/workshopManagement/technicianFindByDate`, { params });
// 全部排班保存
export const saveTechnicianAll = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/repair/workshopManagement/saveTechnicianAll
`, params);
